package com.kiln.juxingqs.ui

import android.content.Intent
import android.util.Log
import android.view.View
import android.view.ViewGroup.MarginLayoutParams
import androidx.appcompat.app.AppCompatDelegate
import androidx.core.view.marginLeft
import client.global.commlib.base.BaseActivity
import client.global.commlib.toast.toast
import client.global.commlib.utils.SharedUtil
import com.github.mikephil.charting.listener.LoadMoreListener
import com.github.mikephil.charting.stockChart.BaseChart.OnHighlightValueSelectedListener
import com.github.mikephil.charting.stockChart.dataManage.KLineDataManage
import com.github.mikephil.charting.stockChart.dataManage.TimeDataManage
import com.kiln.juxingqs.R
import com.kiln.juxingqs.databinding.ActivityTestBinding
import com.kiln.juxingqs.dialog.SelectDateRangeDialog
import com.kiln.juxingqs.ui.vm.TestViewModel
import com.kiln.juxingqs.utils.chart.ChartData
import org.json.JSONException
import org.json.JSONObject

class TestActivity : BaseActivity<TestViewModel, ActivityTestBinding>() {
    override fun getLayout(): Int {
        return R.layout.activity_test
    }

    override fun initView() {

    }

    fun goTop(v: View) {
        toast("fffffff")
//        startActivity(Intent(this@TestActivity, SetSkxxNewActivity::class.java))

    }

    fun switchOn(v: View) {
//        AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
//        toast("111")
//        recreate()

        val intent = Intent(this, WebPayActivity::class.java)
            .apply {
                putExtra("adInfo", "http://pay.jinhengdazong.com/cms/pay_html/")
                putExtra("title", "支付")
            }
        startActivity(intent)
    }
    fun switchOff(v: View) {
        AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
        toast("111")
        recreate()

    }
    override fun initViewModel(): TestViewModel = createViewModel()

}